package com.nbsaas.boot.manufacturing.rest.convert;

import com.nbsaas.boot.manufacturing.data.entity.Material;
import com.nbsaas.boot.manufacturing.api.domain.simple.MaterialSimple;

import com.nbsaas.boot.rest.api.Converter;

/**
* 物料-列表对象转换器
*/

public class MaterialSimpleConvert implements Converter<MaterialSimple, Material> {




@Override
public MaterialSimple convert(Material source) {
    MaterialSimple result = new MaterialSimple();

                result.setIsDangerous(source.getIsDangerous());
                result.setIsPerishable(source.getIsPerishable());
                result.setNote(source.getNote());
                result.setSupplierId(source.getSupplierId());
                result.setLeadTime(source.getLeadTime());
                result.setPurchasePrice(source.getPurchasePrice());
                result.setSupplierCode(source.getSupplierCode());
                result.setId(source.getId());
                result.setShelfLife(source.getShelfLife());
                result.setQualityRequirements(source.getQualityRequirements());
                result.setLastDate(source.getLastDate());
                result.setSupplierMaterialCode(source.getSupplierMaterialCode());
                result.setImage(source.getImage());
                result.setSafetyStock(source.getSafetyStock());
                result.setStorageRequirements(source.getStorageRequirements());
                result.setSalePrice(source.getSalePrice());
                result.setMaterialType(source.getMaterialType());
                result.setSpecification(source.getSpecification());
                result.setWeight(source.getWeight());
                result.setMaterialCode(source.getMaterialCode());
                result.setAddDate(source.getAddDate());
                result.setStandardCost(source.getStandardCost());
                result.setQualityGrade(source.getQualityGrade());
                result.setVolume(source.getVolume());
                result.setUnit(source.getUnit());
                result.setTechnicalParameters(source.getTechnicalParameters());
                result.setName(source.getName());
                result.setMaxStock(source.getMaxStock());
                result.setCurrentStock(source.getCurrentStock());
                result.setMinOrderQuantity(source.getMinOrderQuantity());
                result.setIsCritical(source.getIsCritical());
                result.setCategoryId(source.getCategoryId());
                result.setStatus(source.getStatus());


    return result;
}

}